<%@ taglib prefix="r" uri="/WEB-INF/RTags.tld" %>
<%@ include file="../../RVars.jsp" %>
<%
    String slope = request.getParameter("slope") ;
    String intercept = request.getParameter("intercept") ;
%>
<r:R silent="true">
    png('lineplot.png')
    plot(cos)
    abline(a=intercept,b=slope)
    dev.off()                                                                                                    
</r:R>

<img 
    src='../../SpecificImage?file=/Users/timb/lineplot.png'
/>

<form 
    name='lineplot' 
    action='line.jsp' 
    method='get'
>
    slope: 
    <input 
        type='text' 
        name='slope' 
        value='<%=slope%>'
    />
    <br/>
    intercept: 
    <input 
        type='text' 
        name='intercept' 
        value = '<%=intercept%>'  
    />
    <input 
        type='submit' 
        value='evaluate'
    />
</form>